package com.model;

import com.jfinal.plugin.activerecord.Model;

/**
 * Created by chaiyuan on 2017/5/8.
 */
public class TeacherGrade extends Model<TeacherGrade> {
    public static final TeacherGrade dao = new TeacherGrade();
    public Student getStudent(){
        return Student.dao.findFirst("select * from student where project_id = ?",get("project_id"));
    }
    public Project getProject(){
        return Project.dao.findById(get("project_id"));
    }
    public Teacher getTeacher(){
        return Teacher.dao.findById(get("teacher_id"));
    }
}
